<?php
$this->beginBlock('toolbar');
$t = $this->toolbar();
echo $t->renderBegin();
echo $t->renderItem($this->link($this->__('system.button.new'), $this->buildUrl('*/*/*/create')));
echo $t->renderEnd();

$this->nextBlock('grid');
$g = $this->grid('grid', $this->list->toArray());
echo $g->renderBegin();
echo $g->renderHeadBegin();
echo $g->emptyHead()->setStyle('width', '30px');
echo $g->labelHead($this->__('system.label.name'))->setStyle('width', '100px')->toHtml();
echo $g->labelHead($this->__('system.label.owner_component'))->setStyle('width', '100px')->toHtml();
echo $g->labelHead($this->__('system.label.menu_url'))->toHtml();
echo $g->labelHead($this->__('system.label.sort'))->setStyle('width', '60px')->toHtml();
echo $g->labelHead($this->__('system.label.status'))->setStyle('width', '60px')->toHtml();
echo $g->emptyHead()->setStyle('width', '40px');
echo $g->emptyHead()->setStyle('width', '40px');
echo $g->renderHeadEnd();
while($g->nextRow()):
    $currentRow = $g->getCurrentRow();
	echo $g->renderRowBegin();
	echo $g->indexCell()->toHtml();
	echo $g->labelCell($this->__($currentRow['name']))->toHtml();
    echo $g->labelCell($this->__($currentRow['component_name']))->toHtml();
    echo $g->labelCell('{url}')->toHtml();
    echo $g->labelCell('{sort}')->toHtml();
    echo $g->statusLabelCell('{status}')->toHtml();
    echo $g->linkCell($this->__('system.button.edit'), $this->buildUrl('*/*/*/edit', array('id'=>'{id}')))->toHtml();
    echo $g->linkCell($this->__('system.button.sort'), $this->buildUrl('*/*/*/sort', array('parentid'=>'{parent_id}')))->toHtml();
	echo $g->renderRowEnd();
endwhile;
echo $g->renderEnd();

$this->nextBlock('pagination');
echo $this->pagination($this->recordCount)->toHtml();
$this->endBlock();

echo $this->extend('template'.DS.'list');